<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <body>

        <ui:composition template="./Template.xhtml">

            <ui:define name="content">
                <h3>Register</h3>
                <h:form>
                    <p:outputPanel id="form">
                        <p:messages showDetail="false"/>
                        <h:panelGrid columns="2">
                            Username:
                            <h:inputText value="#{registeraccount.username}" required="true"
                                         requiredMessage="Please enter username of user"></h:inputText>
                            Password:
                            <h:inputSecret value="#{registeraccount.password}" required="true"
                                           requiredMessage="Password can not empty"></h:inputSecret>
                            Email:
                            <h:inputText value="#{registeraccount.email}" required="true"
                                         requiredMessage="Please enter email in focus"></h:inputText>
                            First Name :
                            <h:inputText value="#{registeraccount.firstname}" required="true"
                                         requiredMessage="Please enter firstname of user"></h:inputText>
                            Last Name :
                            <h:inputText value="#{registeraccount.lastname}" required="true"
                                         requiredMessage="Please enter lastname of user"></h:inputText>
                            Address :
                            <h:inputTextarea value="#{registeraccount.address}" required="true"
                                             requiredMessage="Please enter address od user"/>
                            Phone Number :
                            <h:inputText value="#{registeraccount.phone}" required="true"
                                         requiredMessage="Please enter Phone number of user"></h:inputText>
                            <h:outputLabel value="Subcribe to our mail"></h:outputLabel>
                            <h:selectBooleanCheckbox value="#{registeraccount.subcribe}"  title="Subcribe to our mail"/>
                            <h:panelGroup>
                                <p:commandButton value="Submit" action="#{registeraccount.InsertUser}" update="form"/>
                                <p:commandButton value="Reset" type="reset"/>
                            </h:panelGroup>
                        </h:panelGrid>
                    </p:outputPanel>
                </h:form>
            </ui:define>

        </ui:composition>

    </body>
</html>
